<!DOCTYPE html>
<html class="x-admin-sm">

    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="css/font.css">
        <link rel="stylesheet" href="css/xadmin.css">
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript" src="lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="js/xadmin.js"></script>
        <script type="text/javascript" src="js/mtable.js"></script>
        <script type="text/javascript" src="js/setData.js"></script>
        <script type="text/javascript" src="js/sendData.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]--></head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                <form class="layui-form">
                    <div class="project_director">
                        <div class="layui-form-item" style="color: #F08080;">项目总监</div>
                        <div class="layui-form-item" id="project_director_add">
                            <label for="username" class="layui-form-label">项目总监人数</label>
                            <div class="layui-input-inline">
                                <input type="number" min="0" placeholder="请输入项目总监人数"  id="project_director_num" name="project_director_num" autocomplete="off" class="layui-input"></div></div>
                            <input type="number" id="project_director_hide_num" hidden="hidden" value="0">
                        <li id="project_director_upload"></li></div>
<!--                    <button class="layui-btn layui-btn-danger" id="button_store" style="display:block; margin-bottom:20px; width: 80px;" onclick="sendData(7)">
                            <i class="layui-icon"></i>保存</button>-->
                    <button class="layui-btn layui-btn-danger" id='button_store' value="7" style="display:block; margin-bottom:20px; width: 80px;"  lay-submit="" lay-filter="sendData">
                        <i class="layui-icon"></i>保存</button>
                </form>
            </div>
        </div>
        <script>
            var a=GetRequest();
            var tableId=a['tableId'];
            var xmglXmzj = a['xmglXmzj'];
            if(xmglXmzj == 1)   projectDirectorMode();
                else $('.project_director').hide();
            var status=a['status'];
            if(tableId){
                $(window).load( function(){
                    initData(tableId, 7);
                    setTimeout(
                        function(){
                            var evtObj = document.createEvent('UIEvents');
                            evtObj.initUIEvent('input', true, true, window, 1 );
                            document.querySelector("#project_director_num").dispatchEvent(evtObj);
                            if(status==1) {
                                $('#project_director_num').attr("disabled","disabled");
                                var projectDirectorNum = $('#project_director_num').val();
                                $('#project_director_money').attr("disabled","disabled");
                                $('#button_store').hide();
                                $('#project_director_num').attr("disabled","disabled");
                                for (let i =1;i<=projectDirectorNum;++i) {
                                    $('#project_director_name_'+i).attr("disabled","disabled");
                                    $('#project_director_num_'+i).attr("disabled","disabled");
                                    $('#project_director_totalnum_'+i).attr("disabled","disabled");
                        }}},10)
                });
            };
        </script>
    </body>
</html>